﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="UserRightList.aspx.vb" Inherits="Administrator_UserRightList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <table style="width: 100%;">
            <tr>
                <td style="width: 140px; text-align: right;" align="left">
                    <asp:Label ID="lblUserRightDesc0" runat="server" CssClass="control" 
                        Text="รหัสกลุ่มสิทธิ์ :"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtUserRight" runat="server" CssClass="control" Width="170px" 
                        Height="20px" AutoCompleteType="Disabled" MaxLength="20"></asp:TextBox>
                </td>
                
            </tr>
            <tr>
                <td align="left" style="width: 140px; text-align: right;">
                    <asp:Label ID="lblUserRightDesc" runat="server" CssClass="control" 
                        Text="ชื่อกลุ่มสิทธิ์ :"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtUserRightDesc" runat="server" CssClass="control" 
                        Width="315px" Height="20px" AutoCompleteType="Disabled" MaxLength="100"></asp:TextBox>
                </td>
                
            </tr>
           <%-- <tr>
                <td align="left" style="width: 140px; text-align: right;">
                    <asp:Label ID="lblDept" runat="server" CssClass="control"></asp:Label>
                </td>
                <td align="left">
                    <asp:DropDownList ID="ddlDepartment" runat="server" CssClass="control" 
                        Height="16px" Width="238px">
                    </asp:DropDownList>
                </td>
            </tr>--%>
           <%-- <tr>
                <td align="left" style="width: 140px; text-align: right;">
                    <asp:Label ID="lblRole" runat="server" Text="สิทธิ์การเข้าถึงข้อมูล :"></asp:Label>
                </td>
                <td align="left">
                    <asp:CheckBox ID="chkRoleGHB" runat="server" CssClass="control" 
                        Text="Admin ธนาคาร" />
                    <asp:CheckBox ID="ChkRoleSys" runat="server" CssClass="control" 
                        Text="Admin ระบบ" />
                    <asp:CheckBox ID="chkRoleDept" runat="server" CssClass="control" 
                        Text="Admin ฝ่าย" />
                    <asp:CheckBox ID="chkRoleZone" runat="server" CssClass="control" 
                        Text="Admin เขต" />
                    <asp:CheckBox ID="chkRoleBranch" runat="server" CssClass="control" 
                        Text="Admin สาขา/ส่วนงาน" />
                    <asp:CheckBox ID="chkRoleUser" runat="server" Text="ผู้ใช้งาน" />
                </td>
            </tr>--%>
            <tr>
                <td align="left" style="width: 140px; text-align: right;">
                    <asp:Label ID="lblUserRightStatus" runat="server" CssClass="control" 
                        Text="สถานะ :"></asp:Label>
                </td>
                <td align="left">
                    <asp:RadioButtonList ID="rdolStatus" runat="server" 
                        RepeatDirection="Horizontal" Width="226px">
                        <asp:ListItem Value="-1">ทั้งหมด</asp:ListItem>
                        <asp:ListItem Value="1">ใช้งาน</asp:ListItem>
                        <asp:ListItem Value="0">ยกเลิก</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td align="left" style="width: 140px; text-align: right;">
                    &nbsp;</td>
                <td align="left" style="text-align: right">
                    <asp:Button ID="btnSearch" runat="server" CssClass="control" Text="search" 
                        Width="80px"  />
                    <asp:Button ID="btnAdd" runat="server" CssClass="control" Text="Add" 
                        Width="80px" />
                    <asp:Button ID="btnModify" runat="server" CssClass="control" Text="Modify" 
                        Width="80px" />
                    <asp:Button ID="btnDelete" runat="server" CssClass="control" Text="Delete" 
                        Width="80px" />
                    <asp:Button ID="btnClear" runat="server" CssClass="control" Text="Clear" 
                        Width="80px" />
                    <asp:Button ID="btnPrint" runat="server" CssClass="control" Text="Print" 
                        Width="100px" />
                    <asp:Button ID="btnPrintDetail" runat="server" CssClass="control" Text="รายละเอียดกลุ่มสิทธิ์" 
                        Width="160px" />
                </td>
              
            </tr>
         
        </table>
        <div align="center">

        <asp:Label ID="lblMsg" runat="server" CssClass="control" Font-Size="XX-Large" 
                        ForeColor="Red" Height="30px" style="text-align: center" 
                Font-Bold="True"></asp:Label>

        <asp:GridView ID="gvUserRight" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" CellPadding="4" CssClass="control" 
            ForeColor="#333333" Width="100%" AllowPaging="True">
            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
            <PagerSettings Mode="NumericFirstLast" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                    CssClass="cssPager" />
            <Columns>
                <asp:CommandField ButtonType="Image" 
                    SelectImageUrl="~/img/icon/select_icon.gif" ShowSelectButton="True">
                <ItemStyle Width="60px" />
                </asp:CommandField>
                <asp:BoundField DataField="USERRIGHT" HeaderText="รหัสกลุ่มสิทธิ์" 
                    ReadOnly="True" SortExpression="USERRIGHT">
                <ItemStyle HorizontalAlign="Left" Width="170px" />
                </asp:BoundField>
                <asp:BoundField DataField="USERRIGHTDESC" HeaderText="ชื่อกลุ่มสิทธิ์" 
                    ReadOnly="True" SortExpression="USERRIGHTDESC">
                <ItemStyle HorizontalAlign="Left" Width="250px" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Ad. ธนาคาร">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkAdGhb" runat="server" 
                            Checked='<%# iif(eval("roleGhb")=1,true,false) %>' Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ad. ระบบ">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkAdSys" runat="server" 
                            Checked='<%# iif(eval("roleSys")=1,true,false) %>' Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ad. ฝ่าย">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkAdDept" runat="server" 
                            Checked='<%# iif(eval("roleDept")=1,true,false) %>' Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ad. เขต">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkAdZone" runat="server" 
                            Checked='<%# iif(eval("roleZone")=1,true,false) %>' Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ad. สาขา">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkAdBranch" runat="server" 
                            Checked='<%# iif(eval("roleBranch")=1,true,false) %>' Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="ผู้ใช้งาน">
                    <ItemTemplate>
                        <asp:CheckBox ID="chkUser" runat="server" 
                            Checked='<%# iif(eval("roleUser")=1,true,false) %>' Enabled="False" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
            <RowStyle ForeColor="#333333" />
            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" 
                Font-Size="Large" />
            <SelectedRowStyle BackColor="#FFFFCC" Font-Bold="True" ForeColor="Navy" />
            <HeaderStyle BackColor="#E38120" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        </div>
        <div align="right">
                   <asp:Label ID="lblTotal" runat="server" Font-Bold="True" ForeColor="#003300"></asp:Label>
             </div>
    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

